﻿using BCEntity.WeChatComponent.WeChatCustomMenu;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCData.WeChatComponent.WeChatCustomMenu
{
    /// <summary>
    /// 微信自定义菜单数据处理
    /// </summary>
    public interface IWeChatCustomMenuData
    {
        /// <summary>
        /// 检查菜单按钮是否已存在
        /// </summary>
        /// <param name="name">菜单按钮名称</param>
        /// <param name="level">菜单级别</param>
        /// <returns></returns>
        bool CheckMenuExists(string name,int level);
        /// <summary>
        /// 检查菜单按钮是否已存在
        /// </summary>
        /// <param name="weChatCustomMenuId">微信菜单按钮id</param>
        /// <returns></returns>
        bool CheckMenuExists(int weChatCustomMenuId);
        /// <summary>
        /// 获取菜单总数
        /// </summary>
        /// <param name="level">菜单级别</param>
        /// <param name="weChatCustomMenuId">一级菜单Id</param>
        /// <returns></returns>
        int GetMenuCount(int level, int? weChatCustomMenuId);
        /// <summary>
        /// 添加微信自定义菜单
        /// </summary>
        /// <param name="weChatCustomMenuEntity">微信自定义菜单信息</param>
        /// <returns></returns>
        WeChatCustomMenuEntity Add(WeChatCustomMenuEntity weChatCustomMenuEntity);
        /// <summary>
        /// 修改微信自定义菜单
        /// </summary>
        /// <param name="weChatCustomMenuEntity">自定义菜单信息</param>
        /// <returns></returns>
        WeChatCustomMenuEntity Update(WeChatCustomMenuEntity weChatCustomMenuEntity);
        /// <summary>
        /// 获取单个菜单按钮
        /// </summary>
        /// <param name="weChatCustomMenuId">微信菜单按钮Id</param>
        /// <returns></returns>
        WeChatCustomMenuEntity Get(int weChatCustomMenuId);
        /// <summary>
        /// 获取单个菜单按钮
        /// </summary>
        /// <param name="name">菜单按钮名称</param>
        /// <param name="level">菜单级别</param>
        /// <returns></returns>
        WeChatCustomMenuEntity Get(string name, int level);
        /// <summary>
        /// 删除菜单按钮
        /// </summary>
        /// <param name="weChatCustomMenuId">微信菜单按钮Id</param>
        void Delete(int weChatCustomMenuId);
        /// <summary>
        /// 获取微信自定义菜单列表
        /// </summary>
        /// <returns></returns>
        IEnumerable<WeChatCustomMenuEntity> GetList();
    }
}
  